001 package net.sf.xdc.processing;
002
003 /*
004 * Copyright 2005-2006 Jens Voß.
005 *
006 * Licensed under the GNU Lesser General Public License (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://opensource.org/licenses/lgpl-license.php
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019 /**
020 * The class <code>XPathPattern</code> represents a link
021 * within a <code>{</code><code>@link}</code> or a
022 * <code>@see</code> tag whose anchor section is an XPath
023 * expression.
024 *
025 * @author Jens Voß
026 * @since 0.5
027 * @version 0.5
028 */
029 public class XPathPattern {
030
031 private String file;
032 private String pattern;
033 private String targetFile;
034 private String value;
035
036 /**
037 * Public constructor. Sets the file and the pattern members.
038 *
039 * @param file The file part of the link
040 * @param pattern The XPath expression making up the anchor
041 * section
042 */
043 public XPathPattern(String file, String pattern) {
044 this.file = file;
045 this.pattern = pattern;
046 }
047
048 /**
049 * Setter method for this <code>XPathPattern</code>'s
050 * <code>targetFile</code> member.
051 *
052 * @param targetFile This <code>XPathPattern</code>'s
053 * targetFile
054 */
055 public void setTargetFile(String targetFile) {
056 this.targetFile = targetFile;
057 }
058
059 /**
060 * Setter method for this <code>XPathPattern</code>'s
061 * value (i.e. the <code>name</code> of the anchor of the
062 * targetted element in the generated documentation
063 * page).
064 *
065 * @param value This <code>XPathPattern</code>'
066 * value
067 */
068 public void setValue(String value) {
069 this.value = value;
070 }
071
072 /**
073 * Getter method for this <code>XPathPattern</code>'s
074 * file value (i.e. the constituent of the link before
075 * the double hash ('<code>##</code>')).
076 *
077 * @return This <code>XPathPattern</code>'s file value
078 */
079 public String getFile() {
080 return file;
081 }
082
083 /**
084 * Getter method for this <code>XPathPattern</code>'s
085 * pattern (i.e. the constituent of the link after the
086 * double hash ('<code>##</code>')).
087 *
088 * @return This <code>XPathPattern</code>'s pattern.
089 */
090 public String getPattern() {
091 return pattern;
092 }
093
094 /**
095 * Getter method for this <code>XPathPattern</code>'s
096 * <code>targetFile</code> member.
097 *
098 * @return This <code>XPathPattern</code>'s
099 * targetFile
100 */
101 public String getTargetFile() {
102 return targetFile;
103 }
104
105 /**
106 * Getter method for this <code>XPathPattern</code>'s
107 * value (i.e. the <code>name</code> of the anchor of the
108 * targetted element in the generated documentation
109 * page).
110 *
111 * @return This <code>XPathPattern</code>' value
112 */
113 public String getValue() {
114 return value;
115 }
116
117 }